home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / TGCBOR20.ARJ / INTROPAK.COM / EDITWIN.C < prev    next >
Text File  |  1991-06-29  |  850b  |  45 lines

  1. /* a basic example for using the line editor */
  2.  
  3. #include "teglsys.h"
  4. #include "string.h"
  5.  
  6. char mystr[10][255];
  7.  
  8. void createeditbox(void)
  9. {   unsigned x, y, x1, y1, tm, i;
  10.     imagestkptr  fs;
  11.  
  12.     setteglfont(font14);
  13.  
  14.     x = 100;
  15.     y = 100;
  16.     x1 = x+300;
  17.     y1 = y+(10*teglcharheight())+20;
  18.  
  19.     for (i=0; i<10; i++)
  20.        mystr[i][0] = '\0';
  21.  
  22.     pushimage(x,y,x1,y1);
  23.     fs = stackptr;
  24.  
  25.     setfillpattern(gridfill,DARKGRAY);
  26.     bevelbox(x,y,x1,y1,WHITE,LIGHTGRAY,RED,5);
  27.  
  28.     setkeyboardmouse(FALSE);
  29.  
  30.     for (i=0; i<10; i++) {
  31.        tm = 10+i*teglcharheight();
  32.        definestreditevent(fs,10,tm,290,tm+teglcharheight(),254,WHITE,font14,TRUE,mystr[i],allchars,strnoformat,strnoformat,NULL);
  33.     }
  34. }
  35.  
  36. void main()
  37. {
  38.    easytegl();
  39.    easyout();
  40.  
  41.    createeditbox();
  42.  
  43.    teglsupervisor();
  44. }
  45.